import {reqCommentList} from "@/http/api";

export default {
    namespaced: true,//开启命名空间
    state: {
        commentList:[]
    },
    mutations: {
        GETTOPLIST(state,data){
            state.commentList = data.hotComments
        }
    },
    actions: {
        async getComment({commit},id){
            const result = await reqCommentList(id)
            commit('GETTOPLIST',result.data)
        }
    },
    getters: {

    }
}
